/*
 * Magis.java
 *
 * Created on Feb 16, 2009, 12:25:02 PM
 */
package magis;

import edu.byu.intex2.data.Controller;
import edu.byu.intex2.data.GUID;
import edu.byu.intex2.data.Model;
import edu.byu.intex2.data.bo.Customer;
import edu.byu.intex2.data.bo.PhysicalCar;
import edu.byu.intex2.data.bo.Sale;
import edu.byu.intex2.data.bo.SaleLine;
import edu.byu.intex2.data.bo.Salesperson;
import edu.byu.intex2.data.bo.TradeInLine;
import edu.byu.intex2.data.dao.CustomerDAO;
import edu.byu.intex2.data.dao.SaleDAO;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.Map;
import javax.swing.DefaultListModel;
import javax.swing.event.ListDataListener;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;

/**
 * Main screen that displays customer and sale functions.
 * @author Brady
 */
public class Magis extends javax.swing.JFrame {

    // ListModel for CustomerList
    DefaultListModel customerListModel = new DefaultListModel();

    // Data Model for SaleLines JTable
    SaleLineTableDataModel saleLinesTableDataModel;

    // Data Model for SaleItems JTable
    SaleItemsTableDataModel saleItemsTableDataModel;
    // Data Model for TradeInLines JTable
    TradeInLineTableDataModel tradeInLinesTableDataModel;

    /** Creates new form Magis */
    public Magis() {
        initComponents();

        // Center this JFrame
        Controller.getInstance().center(this);

        try {
            startUp();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /** Makes all method calls needed to populate the list models and start the app*/
    private void startUp() throws Exception {
        // Display user's name & position in title
        displayUser();

        // Populate Customer List
        populateCustomerList(null);

        // Do not allow customers to be edited upon startup
        customerEditingState(false);

        // Hide New Sale Group
        saleEditingState(false);
    }

    /** Change the saleLines and tradeInLines JTable column labels to their descriptive names.     */
    private void setColumnLabels() {
        // Assign the labels of the columns
        saleLines_tbl.getColumnModel().getColumn(0).setHeaderValue("Actual Price");
        saleLines_tbl.getColumnModel().getColumn(1).setHeaderValue("List Price");
        saleLines_tbl.getColumnModel().getColumn(2).setHeaderValue("VIN");
        saleLines_tbl.getColumnModel().getColumn(3).setHeaderValue("Color");
        saleLines_tbl.getTableHeader().resizeAndRepaint();

        // TODO: TradeInLines table data model
        tradeIns_tbl.getColumnModel().getColumn(0).setHeaderValue("Trade In Value");
        tradeIns_tbl.getColumnModel().getColumn(1).setHeaderValue("VIN");
        tradeIns_tbl.getColumnModel().getColumn(2).setHeaderValue("Mileage");
        tradeIns_tbl.getColumnModel().getColumn(3).setHeaderValue("Condition");
        tradeIns_tbl.getTableHeader().resizeAndRepaint();

        // Sale Items table data model
        saleItems_tbl.getColumnModel().getColumn(0).setHeaderValue("Description");
        saleItems_tbl.getColumnModel().getColumn(1).setHeaderValue("Price");
        saleItems_tbl.getTableHeader().resizeAndRepaint();
    }

    /** Display Username & position in title */
    private void displayUser() throws Exception {
        userDisp_lbl.setText(Model.getInstance().getEmployee().getFullName());
        positionDisp_lbl.setText(Model.getInstance().getEmployee().getPosition());
    }

    /** Populates the customer list */
    private void populateCustomerList(List<CustomerSearch> customerSearches) throws Exception {
        // Remove all elements
        customerListModel.removeAllElements();

        // Get List of Customer Search Objects if null is passed in
        if (customerSearches == null) {
            customerSearches = CustomerDAO.getInstance().getAll();
        }

        // Add each customer to customerListModel
        for (CustomerSearch cs : customerSearches) {
            customerListModel.addElement(cs);
        }

        // Assign customerListModel to customerList
        customer_list.setModel(customerListModel);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        header_pnl = new javax.swing.JPanel();
        magis_lbl = new javax.swing.JLabel();
        userGroup_pnl = new javax.swing.JPanel();
        welcome_lbl = new javax.swing.JLabel();
        position_lbl = new javax.swing.JLabel();
        positionDisp_lbl = new javax.swing.JLabel();
        userDisp_lbl = new javax.swing.JLabel();
        tabNavigation = new javax.swing.JTabbedPane();
        customerTab_pnl = new javax.swing.JPanel();
        customerList_pnl = new javax.swing.JPanel();
        customerList_sp = new javax.swing.JScrollPane();
        customer_list = new javax.swing.JList();
        custSearchGroup = new javax.swing.JPanel();
        customerSearch_txt = new javax.swing.JTextField();
        addTradeIn_btn1 = new javax.swing.JButton();
        addCustomer_btn = new javax.swing.JButton();
        custInfo_pnl = new javax.swing.JPanel();
        fname_lbl = new javax.swing.JLabel();
        fname_txt = new javax.swing.JFormattedTextField();
        lname_lbl = new javax.swing.JLabel();
        lname_txt = new javax.swing.JFormattedTextField();
        address_lbl = new javax.swing.JLabel();
        address_txt = new javax.swing.JFormattedTextField();
        phone_lbl = new javax.swing.JLabel();
        phone_txt = new javax.swing.JFormattedTextField();
        highPrice_lbl = new javax.swing.JLabel();
        highPrice_txt = new javax.swing.JFormattedTextField();
        lowPrice_lbl = new javax.swing.JLabel();
        lowPrice_txt = new javax.swing.JFormattedTextField();
        saveCustomer_btn = new javax.swing.JButton();
        cancelCustomer_btn = new javax.swing.JButton();
        editCustomer_btn = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        makeSale_btn = new javax.swing.JButton();
        saleTab_pnl = new javax.swing.JPanel();
        custAndSalesperson = new javax.swing.JPanel();
        customerGroup = new javax.swing.JPanel();
        saleCustNameDisp_lbl = new javax.swing.JLabel();
        saleSelectCustomer_btn = new javax.swing.JButton();
        saleCustPhoneDisp_lbl = new javax.swing.JLabel();
        salespersonGroup = new javax.swing.JPanel();
        spName_lbl = new javax.swing.JLabel();
        spId_lbl = new javax.swing.JLabel();
        newSaleGroup = new javax.swing.JPanel();
        newSale_btn = new javax.swing.JButton();
        newSaleInfoGroup = new javax.swing.JPanel();
        carsAndTradeIns = new javax.swing.JPanel();
        saleCarsGroup = new javax.swing.JPanel();
        saleCars_sp = new javax.swing.JScrollPane();
        saleLines_tbl = new javax.swing.JTable();
        saleLinesMenu = new javax.swing.JPanel();
        addViewWarranty_btn = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        removeCar_btn = new javax.swing.JButton();
        addCar_btn = new javax.swing.JButton();
        tradeInsGroup = new javax.swing.JPanel();
        tradeIns_sp = new javax.swing.JScrollPane();
        tradeIns_tbl = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        removeTradeIn_btn = new javax.swing.JButton();
        addTradeIn_btn2 = new javax.swing.JButton();
        saleMenu = new javax.swing.JPanel();
        statusDisp_lbl = new javax.swing.JLabel();
        cancel_btn = new javax.swing.JButton();
        saveSale_btn = new javax.swing.JButton();
        salesTotal = new javax.swing.JPanel();
        saleTotals_scrollPane = new javax.swing.JScrollPane();
        saleItems_tbl = new javax.swing.JTable();
        totalsGroup_pnl = new javax.swing.JPanel();
        financingGroup = new javax.swing.JPanel();
        financed_cb = new javax.swing.JCheckBox();
        paymentPlanGroup = new javax.swing.JPanel();
        downPayment_lbl1 = new javax.swing.JLabel();
        paymentPlan_cmb = new javax.swing.JComboBox();
        downPaymentGroup_pnl = new javax.swing.JPanel();
        downPayment_lbl = new javax.swing.JLabel();
        downPayment_txt = new javax.swing.JTextField();
        saleTotalGroup_pnl = new javax.swing.JPanel();
        saleTotal_lbl = new javax.swing.JLabel();
        saleTotalDisp_lbl = new javax.swing.JTextField();
        serviceTab_pnl = new javax.swing.JPanel();
        custAndTech_pnl = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        customerGroupService = new javax.swing.JPanel();
        serviceCustNameDisp_lbl = new javax.swing.JLabel();
        serviceSelectCustomer_btn = new javax.swing.JButton();
        serviceCustPhoneDisp_lbl = new javax.swing.JLabel();
        newServiceGroup = new javax.swing.JPanel();
        newSale_btn1 = new javax.swing.JButton();
        newServiceInfoGroup = new javax.swing.JPanel();
        vehicleAndTask1 = new javax.swing.JPanel();
        serviceSelections = new javax.swing.JPanel();
        vehicleSelection = new javax.swing.JPanel();
        custVehicleSelect_cbo1 = new javax.swing.JComboBox();
        carDisplay_pnl1 = new javax.swing.JPanel();
        custCarMakeDisplay_lbl1 = new javax.swing.JLabel();
        custCarVin_lbl1 = new javax.swing.JLabel();
        custCarYearDisplay_lbl1 = new javax.swing.JLabel();
        custCarMake_lbl1 = new javax.swing.JLabel();
        custCarYear_lbl1 = new javax.swing.JLabel();
        custCarModelDisplay_lbl1 = new javax.swing.JLabel();
        custCarModel_lbl1 = new javax.swing.JLabel();
        custCarVinDisplay_lbl1 = new javax.swing.JLabel();
        serviceTaskSelection = new javax.swing.JPanel();
        addTaskGroup = new javax.swing.JPanel();
        serviceTaskSelect_cbo1 = new javax.swing.JComboBox();
        addTask_btn = new javax.swing.JButton();
        tasksScrollPanel = new javax.swing.JScrollPane();
        tasksList_jl = new javax.swing.JList();
        taskMenu_pnl = new javax.swing.JPanel();
        deleteTask_btn = new javax.swing.JButton();
        editTask_btn = new javax.swing.JButton();
        summaryPanel_pnl1 = new javax.swing.JPanel();
        serviceDetails_sp = new javax.swing.JScrollPane();
        serviceDetails_ta = new javax.swing.JTextArea();
        grand_total_pnl1 = new javax.swing.JPanel();
        grandTotal_lbl = new javax.swing.JLabel();
        grandTotalDisplay_lbl = new javax.swing.JLabel();
        partsTaxTotalDisplay_lbl = new javax.swing.JLabel();
        partsTaxTotal_lbl = new javax.swing.JLabel();
        partsTotalDisplay_lbl = new javax.swing.JLabel();
        partsTotal_lbl = new javax.swing.JLabel();
        laborTotalDisplay_lbl = new javax.swing.JLabel();
        laborTotal_lbl = new javax.swing.JLabel();
        serviceMenu = new javax.swing.JPanel();
        cancelService_btn = new javax.swing.JButton();
        saveService_btn = new javax.swing.JButton();
        vehicleSearchTab_pnl = new javax.swing.JPanel();
        searchGroup_pnl = new javax.swing.JPanel();
        searchByVin_pnl = new javax.swing.JPanel();
        vin_lbl = new javax.swing.JLabel();
        vin_txt = new javax.swing.JTextField();
        searchVin_btn = new javax.swing.JButton();
        searchDetail_pnl = new javax.swing.JPanel();
        detailsGroup = new javax.swing.JPanel();
        makeGroup = new javax.swing.JPanel();
        make_lbl = new javax.swing.JLabel();
        make_cmb = new javax.swing.JComboBox();
        modelGroup = new javax.swing.JPanel();
        model_lbl = new javax.swing.JLabel();
        model_cmb = new javax.swing.JComboBox();
        yearGroup = new javax.swing.JPanel();
        years_lbl = new javax.swing.JLabel();
        yearStart_txt = new javax.swing.JTextField();
        to_lbl = new javax.swing.JLabel();
        yearEnd_txt = new javax.swing.JTextField();
        priceGroup = new javax.swing.JPanel();
        price_lbl = new javax.swing.JLabel();
        priceStart_txt = new javax.swing.JTextField();
        to_lbl1 = new javax.swing.JLabel();
        priceEnd_txt = new javax.swing.JTextField();
        featuresGroup = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        features_list = new javax.swing.JList();
        searchGroup = new javax.swing.JPanel();
        searchDetails_btn = new javax.swing.JButton();
        colorGroup = new javax.swing.JPanel();
        colorDisp = new javax.swing.JLabel();
        color_txt = new javax.swing.JTextField();
        searchResultsGroup = new javax.swing.JPanel();
        results_sp = new javax.swing.JScrollPane();
        results_table = new javax.swing.JTable();
        vehicleInformation = new javax.swing.JPanel();
        carDetailsGroup = new javax.swing.JPanel();
        custCarMakeDisplay_lbl2 = new javax.swing.JLabel();
        custCarVin_lbl2 = new javax.swing.JLabel();
        custCarYearDisplay_lbl2 = new javax.swing.JLabel();
        custCarMake_lbl2 = new javax.swing.JLabel();
        custCarYear_lbl2 = new javax.swing.JLabel();
        custCarModelDisplay_lbl2 = new javax.swing.JLabel();
        custCarModel_lbl2 = new javax.swing.JLabel();
        custCarVinDisplay_lbl2 = new javax.swing.JLabel();
        carPrice_lbl = new javax.swing.JLabel();
        carPriceDisplay_lbl = new javax.swing.JLabel();
        lot_lbl = new javax.swing.JLabel();
        lotDisplay_lbl = new javax.swing.JLabel();
        color_lbl = new javax.swing.JLabel();
        colorDisplay_lbl = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        carFeatures_sp = new javax.swing.JScrollPane();
        carFeatures_list = new javax.swing.JList();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(750, 800));

        header_pnl.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        magis_lbl.setFont(new java.awt.Font("Tahoma", 0, 18));
        magis_lbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        magis_lbl.setText("Madison Automotive Group");
        magis_lbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        magis_lbl.setPreferredSize(new java.awt.Dimension(431, 22));
        header_pnl.add(magis_lbl);

        userGroup_pnl.setLayout(new java.awt.GridBagLayout());

        welcome_lbl.setText("Welcome:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        userGroup_pnl.add(welcome_lbl, gridBagConstraints);

        position_lbl.setText("Position:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        userGroup_pnl.add(position_lbl, gridBagConstraints);

        positionDisp_lbl.setText("Salesperson");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        userGroup_pnl.add(positionDisp_lbl, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        userGroup_pnl.add(userDisp_lbl, gridBagConstraints);

        header_pnl.add(userGroup_pnl);

        getContentPane().add(header_pnl, java.awt.BorderLayout.NORTH);

        tabNavigation.setPreferredSize(new java.awt.Dimension(600, 400));

        customerTab_pnl.setLayout(new java.awt.BorderLayout());

        customerList_pnl.setBorder(javax.swing.BorderFactory.createTitledBorder("Customer Search"));
        customerList_pnl.setLayout(new java.awt.BorderLayout(5, 5));

        customer_list.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Michael Chambers", "Kellie Goff", "Lauren Goff" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        customer_list.setPreferredSize(new java.awt.Dimension(168, 80));
        customer_list.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                changeCurrentCustomer(evt);
            }
        });
        customerList_sp.setViewportView(customer_list);

        customerList_pnl.add(customerList_sp, java.awt.BorderLayout.CENTER);

        customerSearch_txt.setFont(customerSearch_txt.getFont().deriveFont(customerSearch_txt.getFont().getSize()-2f));
        customerSearch_txt.setText("Customer Search");
        customerSearch_txt.setPreferredSize(new java.awt.Dimension(125, 17));
        customerSearch_txt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                custSearchKeyReleased(evt);
            }
        });
        custSearchGroup.add(customerSearch_txt);

        addTradeIn_btn1.setFont(new java.awt.Font("Tahoma", 0, 8));
        addTradeIn_btn1.setText("Find");
        addTradeIn_btn1.setAlignmentY(0.0F);
        addTradeIn_btn1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        addTradeIn_btn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addTradeIn_btn1ActionPerformed(evt);
            }
        });
        custSearchGroup.add(addTradeIn_btn1);

        customerList_pnl.add(custSearchGroup, java.awt.BorderLayout.NORTH);

        addCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        addCustomer_btn.setText("+ Add Customer");
        addCustomer_btn.setAlignmentY(0.0F);
        addCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addCustomer_btnActionPerformed(evt);
            }
        });
        customerList_pnl.add(addCustomer_btn, java.awt.BorderLayout.PAGE_END);

        customerTab_pnl.add(customerList_pnl, java.awt.BorderLayout.WEST);

        custInfo_pnl.setBorder(javax.swing.BorderFactory.createTitledBorder("Customer Information"));
        custInfo_pnl.setLayout(new java.awt.GridBagLayout());

        fname_lbl.setText("First Name:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(fname_lbl, gridBagConstraints);

        fname_txt.setEditable(false);
        fname_txt.setToolTipText("");
        fname_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(fname_txt, gridBagConstraints);

        lname_lbl.setText("Last Name:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(lname_lbl, gridBagConstraints);

        lname_txt.setEditable(false);
        lname_txt.setToolTipText("");
        lname_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(lname_txt, gridBagConstraints);

        address_lbl.setText("Address:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(address_lbl, gridBagConstraints);

        address_txt.setEditable(false);
        address_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(address_txt, gridBagConstraints);

        phone_lbl.setText("Phone:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(phone_lbl, gridBagConstraints);

        phone_txt.setEditable(false);
        phone_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(phone_txt, gridBagConstraints);

        highPrice_lbl.setText("High Price:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(highPrice_lbl, gridBagConstraints);

        highPrice_txt.setEditable(false);
        highPrice_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(highPrice_txt, gridBagConstraints);

        lowPrice_lbl.setText("Low Price:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(lowPrice_lbl, gridBagConstraints);

        lowPrice_txt.setEditable(false);
        lowPrice_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        lowPrice_txt.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                lowPrice_txtFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(lowPrice_txt, gridBagConstraints);

        saveCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        saveCustomer_btn.setText("Save");
        saveCustomer_btn.setAlignmentY(0.0F);
        saveCustomer_btn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        saveCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveCustomer_btnActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(saveCustomer_btn, gridBagConstraints);

        cancelCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        cancelCustomer_btn.setText("Cancel");
        cancelCustomer_btn.setAlignmentY(0.0F);
        cancelCustomer_btn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        cancelCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelCustomer_btnActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        custInfo_pnl.add(cancelCustomer_btn, gridBagConstraints);

        editCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        editCustomer_btn.setText("Edit");
        editCustomer_btn.setAlignmentY(0.0F);
        editCustomer_btn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        editCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editCustomer_btnActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        custInfo_pnl.add(editCustomer_btn, gridBagConstraints);

        customerTab_pnl.add(custInfo_pnl, java.awt.BorderLayout.CENTER);

        jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        makeSale_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        makeSale_btn.setText("Make Sale");
        makeSale_btn.setAlignmentY(0.0F);
        makeSale_btn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        makeSale_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                goToSaleTab(evt);
            }
        });
        jPanel1.add(makeSale_btn);

        customerTab_pnl.add(jPanel1, java.awt.BorderLayout.SOUTH);

        tabNavigation.addTab("Select Customer", customerTab_pnl);

        saleTab_pnl.setLayout(new java.awt.BorderLayout());

        custAndSalesperson.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        customerGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Customer"));
        customerGroup.setName("customerGroup"); // NOI18N
        customerGroup.setLayout(new java.awt.GridBagLayout());

        saleCustNameDisp_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        saleCustNameDisp_lbl.setText("Please Select");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        customerGroup.add(saleCustNameDisp_lbl, gridBagConstraints);

        saleSelectCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        saleSelectCustomer_btn.setText("Select New Customer");
        saleSelectCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                goToCustomerTab(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0);
        customerGroup.add(saleSelectCustomer_btn, gridBagConstraints);

        saleCustPhoneDisp_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        saleCustPhoneDisp_lbl.setText("Customer");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        customerGroup.add(saleCustPhoneDisp_lbl, gridBagConstraints);

        custAndSalesperson.add(customerGroup);

        salespersonGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Salesperson"));
        salespersonGroup.setName("customerGroup"); // NOI18N
        salespersonGroup.setPreferredSize(new java.awt.Dimension(100, 60));
        salespersonGroup.setLayout(new java.awt.GridBagLayout());

        spName_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        spName_lbl.setText("Dustin Graham");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        salespersonGroup.add(spName_lbl, gridBagConstraints);

        spId_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        spId_lbl.setText("ADS89D798D7");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        salespersonGroup.add(spId_lbl, gridBagConstraints);

        custAndSalesperson.add(salespersonGroup);

        newSaleGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("New Sale"));
        newSaleGroup.setName("customerGroup"); // NOI18N
        newSaleGroup.setPreferredSize(new java.awt.Dimension(114, 60));
        newSaleGroup.setLayout(new java.awt.GridBagLayout());

        newSale_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        newSale_btn.setText("New Sale");
        newSale_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newSale_btnActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        newSaleGroup.add(newSale_btn, gridBagConstraints);

        custAndSalesperson.add(newSaleGroup);

        saleTab_pnl.add(custAndSalesperson, java.awt.BorderLayout.NORTH);

        newSaleInfoGroup.setLayout(new java.awt.BorderLayout());

        carsAndTradeIns.setLayout(new javax.swing.BoxLayout(carsAndTradeIns, javax.swing.BoxLayout.Y_AXIS));

        saleCarsGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Sale Cars"));
        saleCarsGroup.setName("customerGroup"); // NOI18N
        saleCarsGroup.setPreferredSize(new java.awt.Dimension(398, 270));
        saleCarsGroup.setLayout(new javax.swing.BoxLayout(saleCarsGroup, javax.swing.BoxLayout.Y_AXIS));

        saleLines_tbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        saleCars_sp.setViewportView(saleLines_tbl);
        saleLines_tbl.getAccessibleContext().setAccessibleName("saleLines_tbl");

        saleCarsGroup.add(saleCars_sp);

        addViewWarranty_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        addViewWarranty_btn.setText("Add/View Warranties");
        addViewWarranty_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addViewWarranty_btnActionPerformed(evt);
            }
        });
        saleLinesMenu.add(addViewWarranty_btn);

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator1.setPreferredSize(new java.awt.Dimension(2, 19));
        saleLinesMenu.add(jSeparator1);

        removeCar_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        removeCar_btn.setText("- Remove Car");
        removeCar_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeCar(evt);
            }
        });
        saleLinesMenu.add(removeCar_btn);

        addCar_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        addCar_btn.setText("+ Add Car");
        addCar_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSaleCar(evt);
            }
        });
        saleLinesMenu.add(addCar_btn);

        saleCarsGroup.add(saleLinesMenu);

        carsAndTradeIns.add(saleCarsGroup);

        tradeInsGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Trade-Ins"));
        tradeInsGroup.setName("customerGroup"); // NOI18N
        tradeInsGroup.setPreferredSize(new java.awt.Dimension(570, 258));
        tradeInsGroup.setLayout(new javax.swing.BoxLayout(tradeInsGroup, javax.swing.BoxLayout.Y_AXIS));

        tradeIns_tbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tradeIns_sp.setViewportView(tradeIns_tbl);

        tradeInsGroup.add(tradeIns_sp);

        removeTradeIn_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        removeTradeIn_btn.setText("- Remove Trade-In");
        removeTradeIn_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeTradeIn_btnActionPerformed(evt);
            }
        });
        jPanel2.add(removeTradeIn_btn);

        addTradeIn_btn2.setFont(new java.awt.Font("Tahoma", 0, 8));
        addTradeIn_btn2.setText("+ Add Trade-In");
        addTradeIn_btn2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addTradeIn_btn2ActionPerformed(evt);
            }
        });
        jPanel2.add(addTradeIn_btn2);

        tradeInsGroup.add(jPanel2);

        carsAndTradeIns.add(tradeInsGroup);

        newSaleInfoGroup.add(carsAndTradeIns, java.awt.BorderLayout.CENTER);

        saleMenu.setPreferredSize(new java.awt.Dimension(250, 30));
        saleMenu.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        statusDisp_lbl.setFont(new java.awt.Font("Tahoma", 0, 9));
        statusDisp_lbl.setText(" ");
        saleMenu.add(statusDisp_lbl);

        cancel_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        cancel_btn.setText("Cancel");
        cancel_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancel_btnActionPerformed(evt);
            }
        });
        saleMenu.add(cancel_btn);

        saveSale_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        saveSale_btn.setText("Save Sale");
        saveSale_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveSale_btnActionPerformed(evt);
            }
        });
        saleMenu.add(saveSale_btn);

        newSaleInfoGroup.add(saleMenu, java.awt.BorderLayout.SOUTH);

        salesTotal.setBorder(javax.swing.BorderFactory.createTitledBorder("Sales Total"));
        salesTotal.setPreferredSize(new java.awt.Dimension(200, 200));
        salesTotal.setLayout(new java.awt.BorderLayout());

        saleTotals_scrollPane.setPreferredSize(new java.awt.Dimension(250, 402));

        saleItems_tbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        saleItems_tbl.setPreferredSize(new java.awt.Dimension(150, 64));
        saleTotals_scrollPane.setViewportView(saleItems_tbl);

        salesTotal.add(saleTotals_scrollPane, java.awt.BorderLayout.CENTER);

        totalsGroup_pnl.setLayout(new javax.swing.BoxLayout(totalsGroup_pnl, javax.swing.BoxLayout.Y_AXIS));

        financingGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        financed_cb.setText("Financed");
        financed_cb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                financed_cbActionPerformed(evt);
            }
        });
        financingGroup.add(financed_cb);

        totalsGroup_pnl.add(financingGroup);

        paymentPlanGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        downPayment_lbl1.setFont(new java.awt.Font("Tahoma", 0, 9));
        downPayment_lbl1.setText("Payment Plan:");
        paymentPlanGroup.add(downPayment_lbl1);

        paymentPlan_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Monthly", "Quarterly", "Yearly" }));
        paymentPlanGroup.add(paymentPlan_cmb);

        totalsGroup_pnl.add(paymentPlanGroup);

        downPaymentGroup_pnl.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        downPayment_lbl.setFont(new java.awt.Font("Tahoma", 0, 9));
        downPayment_lbl.setText("Down Payment:");
        downPaymentGroup_pnl.add(downPayment_lbl);

        downPayment_txt.setFont(downPayment_txt.getFont().deriveFont(downPayment_txt.getFont().getSize()-2f));
        downPayment_txt.setPreferredSize(new java.awt.Dimension(80, 17));
        downPayment_txt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                downPayment_txtKeyReleased(evt);
            }
        });
        downPaymentGroup_pnl.add(downPayment_txt);

        totalsGroup_pnl.add(downPaymentGroup_pnl);

        saleTotalGroup_pnl.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        saleTotal_lbl.setFont(new java.awt.Font("Tahoma", 0, 9));
        saleTotal_lbl.setText("Sale Total:");
        saleTotalGroup_pnl.add(saleTotal_lbl);

        saleTotalDisp_lbl.setEditable(false);
        saleTotalDisp_lbl.setFont(saleTotalDisp_lbl.getFont().deriveFont(saleTotalDisp_lbl.getFont().getSize()-2f));
        saleTotalDisp_lbl.setForeground(new java.awt.Color(0, 102, 51));
        saleTotalDisp_lbl.setPreferredSize(new java.awt.Dimension(80, 17));
        saleTotalGroup_pnl.add(saleTotalDisp_lbl);

        totalsGroup_pnl.add(saleTotalGroup_pnl);

        salesTotal.add(totalsGroup_pnl, java.awt.BorderLayout.SOUTH);

        newSaleInfoGroup.add(salesTotal, java.awt.BorderLayout.EAST);

        saleTab_pnl.add(newSaleInfoGroup, java.awt.BorderLayout.CENTER);

        tabNavigation.addTab("Create Sale", saleTab_pnl);

        serviceTab_pnl.setLayout(new java.awt.BorderLayout());

        custAndTech_pnl.setAlignmentY(0.0F);
        custAndTech_pnl.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
        custAndTech_pnl.add(jPanel5);

        customerGroupService.setBorder(javax.swing.BorderFactory.createTitledBorder("Customer"));
        customerGroupService.setName("customerGroup"); // NOI18N
        customerGroupService.setLayout(new java.awt.GridBagLayout());

        serviceCustNameDisp_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        serviceCustNameDisp_lbl.setText("Please Select");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        customerGroupService.add(serviceCustNameDisp_lbl, gridBagConstraints);

        serviceSelectCustomer_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        serviceSelectCustomer_btn.setText("Select New Customer");
        serviceSelectCustomer_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                serviceSelectCustomer_btngoToCustomerTab(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0);
        customerGroupService.add(serviceSelectCustomer_btn, gridBagConstraints);

        serviceCustPhoneDisp_lbl.setFont(new java.awt.Font("Tahoma", 0, 10));
        serviceCustPhoneDisp_lbl.setText("Customer");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        customerGroupService.add(serviceCustPhoneDisp_lbl, gridBagConstraints);

        custAndTech_pnl.add(customerGroupService);

        newServiceGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("New Service"));
        newServiceGroup.setName("customerGroup"); // NOI18N
        newServiceGroup.setPreferredSize(new java.awt.Dimension(114, 60));
        newServiceGroup.setLayout(new java.awt.GridBagLayout());

        newSale_btn1.setFont(new java.awt.Font("Tahoma", 0, 8));
        newSale_btn1.setText("New Service");
        newSale_btn1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newSale_btn1ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        newServiceGroup.add(newSale_btn1, gridBagConstraints);

        custAndTech_pnl.add(newServiceGroup);

        serviceTab_pnl.add(custAndTech_pnl, java.awt.BorderLayout.NORTH);

        newServiceInfoGroup.setLayout(new java.awt.BorderLayout());

        vehicleAndTask1.setMinimumSize(new java.awt.Dimension(200, 500));
        vehicleAndTask1.setPreferredSize(new java.awt.Dimension(971, 1000));
        vehicleAndTask1.setLayout(new java.awt.BorderLayout());

        serviceSelections.setMaximumSize(new java.awt.Dimension(5000, 5000));
        serviceSelections.setPreferredSize(new java.awt.Dimension(180, 400));

        vehicleSelection.setBorder(javax.swing.BorderFactory.createTitledBorder("Vehicle Selection"));
        vehicleSelection.setPreferredSize(new java.awt.Dimension(180, 60));

        custVehicleSelect_cbo1.setFont(new java.awt.Font("Tahoma", 0, 10));
        custVehicleSelect_cbo1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Honda, Accord 2003", "Toyota, Supra 1998", "Dodge, Charger 1976", "Chevrolet, Corvette 2010" }));
        custVehicleSelect_cbo1.setPreferredSize(new java.awt.Dimension(160, 20));
        custVehicleSelect_cbo1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                custVehicleSelect_cbo1vehicleSelected(evt);
            }
        });
        vehicleSelection.add(custVehicleSelect_cbo1);

        serviceSelections.add(vehicleSelection);

        carDisplay_pnl1.setBorder(javax.swing.BorderFactory.createTitledBorder("Vehicle Information"));
        carDisplay_pnl1.setPreferredSize(new java.awt.Dimension(180, 80));
        carDisplay_pnl1.setLayout(new java.awt.GridBagLayout());

        custCarMakeDisplay_lbl1.setText("Honda");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 16;
        carDisplay_pnl1.add(custCarMakeDisplay_lbl1, gridBagConstraints);

        custCarVin_lbl1.setText("VIN:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDisplay_pnl1.add(custCarVin_lbl1, gridBagConstraints);

        custCarYearDisplay_lbl1.setText("2003");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDisplay_pnl1.add(custCarYearDisplay_lbl1, gridBagConstraints);

        custCarMake_lbl1.setText("Make:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 13;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDisplay_pnl1.add(custCarMake_lbl1, gridBagConstraints);

        custCarYear_lbl1.setText("Year:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDisplay_pnl1.add(custCarYear_lbl1, gridBagConstraints);

        custCarModelDisplay_lbl1.setText("Accord");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDisplay_pnl1.add(custCarModelDisplay_lbl1, gridBagConstraints);

        custCarModel_lbl1.setText("Model:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 3;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDisplay_pnl1.add(custCarModel_lbl1, gridBagConstraints);

        custCarVinDisplay_lbl1.setText("12345678901234567");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDisplay_pnl1.add(custCarVinDisplay_lbl1, gridBagConstraints);

        serviceSelections.add(carDisplay_pnl1);

        serviceTaskSelection.setBorder(javax.swing.BorderFactory.createTitledBorder("Tasks"));
        serviceTaskSelection.setMaximumSize(new java.awt.Dimension(350, 200));
        serviceTaskSelection.setMinimumSize(new java.awt.Dimension(151, 250));
        serviceTaskSelection.setPreferredSize(new java.awt.Dimension(180, 200));
        serviceTaskSelection.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        addTaskGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Add Task"));

        serviceTaskSelect_cbo1.setFont(new java.awt.Font("Tahoma", 0, 10));
        serviceTaskSelect_cbo1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Brake Job", "Lube Job", "Tire Rotation", "Spark Plugs", " " }));
        addTaskGroup.add(serviceTaskSelect_cbo1);

        addTask_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        addTask_btn.setText("+ Add");
        addTask_btn.setMargin(new java.awt.Insets(2, 2, 2, 2));
        addTask_btn.setMinimumSize(new java.awt.Dimension(20, 19));
        addTask_btn.setPreferredSize(new java.awt.Dimension(45, 19));
        addTask_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addTask_btnActionPerformed(evt);
            }
        });
        addTaskGroup.add(addTask_btn);

        serviceTaskSelection.add(addTaskGroup);

        tasksScrollPanel.setPreferredSize(new java.awt.Dimension(160, 50));

        tasksList_jl.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        tasksScrollPanel.setViewportView(tasksList_jl);

        serviceTaskSelection.add(tasksScrollPanel);

        deleteTask_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        deleteTask_btn.setText("- Delete");
        deleteTask_btn.setMargin(new java.awt.Insets(2, 2, 2, 2));
        deleteTask_btn.setMinimumSize(new java.awt.Dimension(20, 19));
        deleteTask_btn.setPreferredSize(new java.awt.Dimension(45, 19));
        deleteTask_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteTask_btnActionPerformed(evt);
            }
        });
        taskMenu_pnl.add(deleteTask_btn);

        editTask_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        editTask_btn.setText("Edit");
        editTask_btn.setMargin(new java.awt.Insets(2, 2, 2, 2));
        editTask_btn.setMinimumSize(new java.awt.Dimension(20, 19));
        editTask_btn.setPreferredSize(new java.awt.Dimension(45, 19));
        editTask_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editTask_btnActionPerformed(evt);
            }
        });
        taskMenu_pnl.add(editTask_btn);

        serviceTaskSelection.add(taskMenu_pnl);

        serviceSelections.add(serviceTaskSelection);

        vehicleAndTask1.add(serviceSelections, java.awt.BorderLayout.WEST);

        summaryPanel_pnl1.setBorder(javax.swing.BorderFactory.createTitledBorder("Service Detail"));
        summaryPanel_pnl1.setMinimumSize(new java.awt.Dimension(427, 400));
        summaryPanel_pnl1.setPreferredSize(new java.awt.Dimension(450, 400));
        summaryPanel_pnl1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        serviceDetails_sp.setBackground(new java.awt.Color(204, 204, 204));
        serviceDetails_sp.setPreferredSize(new java.awt.Dimension(550, 400));

        serviceDetails_ta.setBackground(javax.swing.UIManager.getDefaults().getColor("Panel.background"));
        serviceDetails_ta.setColumns(20);
        serviceDetails_ta.setRows(5);
        serviceDetails_ta.setText("Task\tQty\tPart\t\t\tUnit Price\tTotal\n----------------------------------------------------------------\nBrake Job\n\t2\tLabor Hours\t\t$90.00\t\t$180.00\t\n\t2\tBrakes\t\t\t$25.00\t\t$50.00\n\t4\tBrake Pads\t\t$20.50\t\t$82.00\n\t2\tRotars\t\t\t$42.00\t\t$84.00\n\t\t\t\t\tParts Total:\t$216.00\n\t\t\t\t\tParts Tax:\t$55.00\n\t\t\t\t\tSubtotal:\t$541.00\t\n\nTransmission Change\n\t10\tLabor Hours\t\t$90.00\t\t$900.00\t\n\t1\tTransmission\t\t$1500.00\t$1500.00\n\t\t\t\t\tParts Total:\t$1500.00\n\t\t\t\t\tParts Tax:\t$105.00\n\t\t\t\t\tSubtotal:\t$2505.00\t");
        serviceDetails_ta.setMinimumSize(new java.awt.Dimension(550, 112));
        serviceDetails_ta.setPreferredSize(new java.awt.Dimension(164, 94));
        serviceDetails_sp.setViewportView(serviceDetails_ta);

        summaryPanel_pnl1.add(serviceDetails_sp);

        grand_total_pnl1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        grand_total_pnl1.setLayout(new java.awt.GridBagLayout());

        grandTotal_lbl.setFont(new java.awt.Font("Tahoma", 1, 11));
        grandTotal_lbl.setText("$3856.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        grand_total_pnl1.add(grandTotal_lbl, gridBagConstraints);

        grandTotalDisplay_lbl.setFont(new java.awt.Font("Tahoma", 1, 11));
        grandTotalDisplay_lbl.setText("Grand Total: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);
        grand_total_pnl1.add(grandTotalDisplay_lbl, gridBagConstraints);

        partsTaxTotalDisplay_lbl.setText("Parts Tax Total:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);
        grand_total_pnl1.add(partsTaxTotalDisplay_lbl, gridBagConstraints);

        partsTaxTotal_lbl.setText("$160.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        grand_total_pnl1.add(partsTaxTotal_lbl, gridBagConstraints);

        partsTotalDisplay_lbl.setText("Parts Total:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);
        grand_total_pnl1.add(partsTotalDisplay_lbl, gridBagConstraints);

        partsTotal_lbl.setText("$1716.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        grand_total_pnl1.add(partsTotal_lbl, gridBagConstraints);

        laborTotalDisplay_lbl.setText("Labor Total:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);
        grand_total_pnl1.add(laborTotalDisplay_lbl, gridBagConstraints);

        laborTotal_lbl.setText("$1080.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        grand_total_pnl1.add(laborTotal_lbl, gridBagConstraints);

        summaryPanel_pnl1.add(grand_total_pnl1);

        vehicleAndTask1.add(summaryPanel_pnl1, java.awt.BorderLayout.CENTER);

        newServiceInfoGroup.add(vehicleAndTask1, java.awt.BorderLayout.CENTER);

        serviceMenu.setPreferredSize(new java.awt.Dimension(250, 30));
        serviceMenu.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        cancelService_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        cancelService_btn.setText("Cancel");
        serviceMenu.add(cancelService_btn);

        saveService_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        saveService_btn.setText("Save Service");
        serviceMenu.add(saveService_btn);

        newServiceInfoGroup.add(serviceMenu, java.awt.BorderLayout.SOUTH);

        serviceTab_pnl.add(newServiceInfoGroup, java.awt.BorderLayout.CENTER);

        tabNavigation.addTab("Service", serviceTab_pnl);

        vehicleSearchTab_pnl.setLayout(new java.awt.BorderLayout());

        searchGroup_pnl.setMaximumSize(new java.awt.Dimension(32757, 32767));
        searchGroup_pnl.setLayout(new java.awt.BorderLayout());

        searchByVin_pnl.setBorder(javax.swing.BorderFactory.createTitledBorder("Search By VIN"));
        searchByVin_pnl.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        vin_lbl.setText("VIN:");
        searchByVin_pnl.add(vin_lbl);

        vin_txt.setPreferredSize(new java.awt.Dimension(150, 20));
        searchByVin_pnl.add(vin_txt);

        searchVin_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        searchVin_btn.setText("Search");
        searchVin_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchVin_btngoToCustomerTab(evt);
            }
        });
        searchByVin_pnl.add(searchVin_btn);

        searchGroup_pnl.add(searchByVin_pnl, java.awt.BorderLayout.NORTH);

        searchDetail_pnl.setBorder(javax.swing.BorderFactory.createTitledBorder("Search By Details"));
        searchDetail_pnl.setMaximumSize(new java.awt.Dimension(2147483647, 500));
        searchDetail_pnl.setLayout(new java.awt.BorderLayout());

        detailsGroup.setLayout(new java.awt.GridBagLayout());

        makeGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        make_lbl.setText("Make:");
        makeGroup.add(make_lbl);

        make_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ford", "Dodge", "Toyota" }));
        makeGroup.add(make_cmb);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        detailsGroup.add(makeGroup, gridBagConstraints);

        modelGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        model_lbl.setText("Model:");
        modelGroup.add(model_lbl);

        model_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ranger", "Mustang", "Escape" }));
        modelGroup.add(model_cmb);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        detailsGroup.add(modelGroup, gridBagConstraints);

        yearGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        years_lbl.setText("Years:");
        yearGroup.add(years_lbl);

        yearStart_txt.setText("2005");
        yearStart_txt.setPreferredSize(new java.awt.Dimension(40, 20));
        yearGroup.add(yearStart_txt);

        to_lbl.setText("to");
        yearGroup.add(to_lbl);

        yearEnd_txt.setText("2009");
        yearEnd_txt.setPreferredSize(new java.awt.Dimension(40, 20));
        yearGroup.add(yearEnd_txt);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        detailsGroup.add(yearGroup, gridBagConstraints);

        priceGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        price_lbl.setText("Price:");
        priceGroup.add(price_lbl);

        priceStart_txt.setText("10000");
        priceStart_txt.setPreferredSize(new java.awt.Dimension(40, 20));
        priceGroup.add(priceStart_txt);

        to_lbl1.setText("to");
        priceGroup.add(to_lbl1);

        priceEnd_txt.setText("20000");
        priceEnd_txt.setPreferredSize(new java.awt.Dimension(40, 20));
        priceGroup.add(priceEnd_txt);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        detailsGroup.add(priceGroup, gridBagConstraints);

        featuresGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Features"));
        featuresGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        features_list.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Air conditioning", "Anti-lock brakes", "Power windows", "Leather seats", "Sun roof" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(features_list);

        featuresGroup.add(jScrollPane1);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        detailsGroup.add(featuresGroup, gridBagConstraints);

        searchGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        searchDetails_btn.setFont(new java.awt.Font("Tahoma", 0, 8));
        searchDetails_btn.setText("Search");
        searchDetails_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchDetails_btngoToCustomerTab(evt);
            }
        });
        searchGroup.add(searchDetails_btn);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        detailsGroup.add(searchGroup, gridBagConstraints);

        colorGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        colorDisp.setText("Color:");
        colorGroup.add(colorDisp);

        color_txt.setText("blue");
        color_txt.setPreferredSize(new java.awt.Dimension(40, 20));
        colorGroup.add(color_txt);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        detailsGroup.add(colorGroup, gridBagConstraints);

        searchDetail_pnl.add(detailsGroup, java.awt.BorderLayout.CENTER);

        searchGroup_pnl.add(searchDetail_pnl, java.awt.BorderLayout.CENTER);

        vehicleSearchTab_pnl.add(searchGroup_pnl, java.awt.BorderLayout.WEST);

        searchResultsGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Results"));
        searchResultsGroup.setLayout(new java.awt.BorderLayout());

        results_table.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        results_sp.setViewportView(results_table);

        searchResultsGroup.add(results_sp, java.awt.BorderLayout.CENTER);

        vehicleInformation.setBorder(javax.swing.BorderFactory.createTitledBorder("Vehicle Informatoin"));
        vehicleInformation.setLayout(new javax.swing.BoxLayout(vehicleInformation, javax.swing.BoxLayout.X_AXIS));

        carDetailsGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Details"));
        carDetailsGroup.setMinimumSize(new java.awt.Dimension(159, 100));
        carDetailsGroup.setPreferredSize(new java.awt.Dimension(180, 100));
        carDetailsGroup.setLayout(new java.awt.GridBagLayout());

        custCarMakeDisplay_lbl2.setText("Honda");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 16;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        carDetailsGroup.add(custCarMakeDisplay_lbl2, gridBagConstraints);

        custCarVin_lbl2.setText("VIN:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(custCarVin_lbl2, gridBagConstraints);

        custCarYearDisplay_lbl2.setText("2003");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDetailsGroup.add(custCarYearDisplay_lbl2, gridBagConstraints);

        custCarMake_lbl2.setText("Make:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 13;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(custCarMake_lbl2, gridBagConstraints);

        custCarYear_lbl2.setText("Year:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(custCarYear_lbl2, gridBagConstraints);

        custCarModelDisplay_lbl2.setText("Accord");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDetailsGroup.add(custCarModelDisplay_lbl2, gridBagConstraints);

        custCarModel_lbl2.setText("Model:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 3;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(custCarModel_lbl2, gridBagConstraints);

        custCarVinDisplay_lbl2.setText("12345678901234567");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        carDetailsGroup.add(custCarVinDisplay_lbl2, gridBagConstraints);

        carPrice_lbl.setText("Price:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(carPrice_lbl, gridBagConstraints);

        carPriceDisplay_lbl.setText("$15,000.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        carDetailsGroup.add(carPriceDisplay_lbl, gridBagConstraints);

        lot_lbl.setText("Lot:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(lot_lbl, gridBagConstraints);

        lotDisplay_lbl.setText("Lot #1");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        carDetailsGroup.add(lotDisplay_lbl, gridBagConstraints);

        color_lbl.setText("Color:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        carDetailsGroup.add(color_lbl, gridBagConstraints);

        colorDisplay_lbl.setText("blue");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        carDetailsGroup.add(colorDisplay_lbl, gridBagConstraints);

        vehicleInformation.add(carDetailsGroup);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Features"));

        carFeatures_list.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Air conditioning", "Anti-lock brakes", "Power windows", "Leather seats", "Sun roof" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        carFeatures_sp.setViewportView(carFeatures_list);

        jPanel3.add(carFeatures_sp);

        vehicleInformation.add(jPanel3);

        searchResultsGroup.add(vehicleInformation, java.awt.BorderLayout.SOUTH);

        vehicleSearchTab_pnl.add(searchResultsGroup, java.awt.BorderLayout.CENTER);

        tabNavigation.addTab("Vehicle Search", vehicleSearchTab_pnl);

        getContentPane().add(tabNavigation, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void lowPrice_txtFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_lowPrice_txtFocusLost
}//GEN-LAST:event_lowPrice_txtFocusLost

    private void changeCurrentCustomer(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changeCurrentCustomer
        // Get Selected Customer
        CustomerSearch cust = (CustomerSearch) customer_list.getSelectedValue();

        // Update Selected Customer Info
        try {
            Customer customer = CustomerDAO.getInstance().read(cust.getId());
            Model.getInstance().setCustomer(customer);

            // Customer Screen
            updateCustomerInfoDisplay(customer);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }//GEN-LAST:event_changeCurrentCustomer

    private void cancelCustomer_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelCustomer_btnActionPerformed
        // Begin Edit of the customer
        customerEditingState(false);

        // Update the customer attribute displays in case the user made some edits
        updateCustomerInfoDisplay(Model.getInstance().getCustomer());
}//GEN-LAST:event_cancelCustomer_btnActionPerformed

    private void editCustomer_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editCustomer_btnActionPerformed
        customerEditingState(true);
}//GEN-LAST:event_editCustomer_btnActionPerformed

    private void saveCustomer_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveCustomer_btnActionPerformed
        // Lock down our customer editing state
        customerEditingState(false);

        // Grab our customer from the model and save it.
        Customer customer = Model.getInstance().getCustomer();
        saveCustomer(customer);
    }//GEN-LAST:event_saveCustomer_btnActionPerformed

    private void addCustomer_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addCustomer_btnActionPerformed
        try {
            // Add a blank Customer and set it to our model
            Model.getInstance().setCustomer(CustomerDAO.getInstance().create(GUID.generate()));

            // Update our visual display (will be blank)
            updateCustomerInfoDisplay(Model.getInstance().getCustomer());
        } catch (Exception e) {
            e.printStackTrace();
        }

        // Set Customer Editing State
        customerEditingState(true);
}//GEN-LAST:event_addCustomer_btnActionPerformed

    private void addTradeIn_btn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addTradeIn_btn1ActionPerformed
        searchCustomers();

    }//GEN-LAST:event_addTradeIn_btn1ActionPerformed

    private void custSearchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_custSearchKeyReleased
        searchCustomers(); // lets do any key press!
    }//GEN-LAST:event_custSearchKeyReleased

    private void goToCustomerTab(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goToCustomerTab
        tabNavigation.setSelectedIndex(0); // Customer Tab
}//GEN-LAST:event_goToCustomerTab

    private void goToSaleTab(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goToSaleTab
        tabNavigation.setSelectedIndex(1); // Sale Tab
    }//GEN-LAST:event_goToSaleTab

    private void addSaleCar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addSaleCar
        new AddSaleLine(Model.getInstance().getSale(), saleLinesTableDataModel, saleItemsTableDataModel).setVisible(true);
    }//GEN-LAST:event_addSaleCar

    private void newSale_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newSale_btnActionPerformed
        saleEditingState(true);
    }//GEN-LAST:event_newSale_btnActionPerformed

    private void removeCar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeCar
        // Remove Sale Line of the currently selected row
        int row = saleLines_tbl.getSelectedRow();
        if (row < 0) {
            return;
        }
        SaleLine saleLine = saleLinesTableDataModel.getSaleLine(row);
        Model.getInstance().getSale().removeSaleLine(saleLine);
        saleLinesTableDataModel.fireTableDataChanged();
        saleItemsTableDataModel.fireTableDataChanged();
    }//GEN-LAST:event_removeCar

    private void downPayment_txtKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_downPayment_txtKeyReleased
        calculateSaleTotal();
    }//GEN-LAST:event_downPayment_txtKeyReleased

    private void cancel_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancel_btnActionPerformed
        saleEditingState(false);
    }//GEN-LAST:event_cancel_btnActionPerformed

    private void saveSale_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveSale_btnActionPerformed
        saveSale(Model.getInstance().getSale());
    }//GEN-LAST:event_saveSale_btnActionPerformed

    private void financed_cbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_financed_cbActionPerformed
        financedState(financed_cb.isSelected());
    }//GEN-LAST:event_financed_cbActionPerformed

    private void addTradeIn_btn2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addTradeIn_btn2ActionPerformed
        new AddTradeInLine(Model.getInstance().getSale(), tradeInLinesTableDataModel, saleItemsTableDataModel).setVisible(true);
    }//GEN-LAST:event_addTradeIn_btn2ActionPerformed

    private void removeTradeIn_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeTradeIn_btnActionPerformed
        // Remove Trade In Line of the currently selected row
        int row = tradeIns_tbl.getSelectedRow();
        if (row < 0) {
            return;
        }
        TradeInLine til = tradeInLinesTableDataModel.getTradeInLine(row);
        Model.getInstance().getSale().removeTradeInLine(til);
        tradeInLinesTableDataModel.fireTableDataChanged();
        saleItemsTableDataModel.fireTableDataChanged();
    }//GEN-LAST:event_removeTradeIn_btnActionPerformed

    private void addViewWarranty_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addViewWarranty_btnActionPerformed
        // Get Selected Sale Line
        int row = saleLines_tbl.getSelectedRow();
        if (row < 0) {
            return;
        }
        SaleLine saleLine = saleLinesTableDataModel.getSaleLine(row);

        try {
            PhysicalCar pc = saleLine.getPhysicalCar();
            new ViewWarranties(pc).setVisible(true);
        } catch (Exception e){
            e.printStackTrace();
        }

        // Open View Warranties on PhysicalCar
        
    }//GEN-LAST:event_addViewWarranty_btnActionPerformed

    private void serviceSelectCustomer_btngoToCustomerTab(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_serviceSelectCustomer_btngoToCustomerTab
        tabNavigation.setSelectedIndex(0); // Customer Tab
}//GEN-LAST:event_serviceSelectCustomer_btngoToCustomerTab

    private void newSale_btn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newSale_btn1ActionPerformed
        serviceEditingState(true);
}//GEN-LAST:event_newSale_btn1ActionPerformed

    private void custVehicleSelect_cbo1vehicleSelected(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_custVehicleSelect_cbo1vehicleSelected
        // Get Selected PC from Combo Box
        PhysicalCar pc = (PhysicalCar) custVehicleSelect_cbo.getSelectedItem();

        // Assign PC to the service
        ServiceController.getInstance().getService().setPhysicalCar(pc);

        // Populate Vehicle Information
        populateVehicleAttributes(pc);

        // Populate Tasks ComboBox
        ConceptualCar cc = pc.getConceptualCar();
        populateTasksComboBox(cc);
}//GEN-LAST:event_custVehicleSelect_cbo1vehicleSelected

    private void addTask_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addTask_btnActionPerformed
        // Get Task from combo box
        Task task = new Task(GUID.generate());

        // Open up edit service task modal window and pass in magis and the task
        new EditServiceTask(this, task).setVisible(true);
}//GEN-LAST:event_addTask_btnActionPerformed

    private void deleteTask_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteTask_btnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_deleteTask_btnActionPerformed

    private void editTask_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editTask_btnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_editTask_btnActionPerformed

    private void searchVin_btngoToCustomerTab(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchVin_btngoToCustomerTab
        // TODO add your handling code here:
}//GEN-LAST:event_searchVin_btngoToCustomerTab

    private void searchDetails_btngoToCustomerTab(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchDetails_btngoToCustomerTab
        // TODO add your handling code here:
}//GEN-LAST:event_searchDetails_btngoToCustomerTab
    //this is an action listener for the remove buttons it's not perfect so you'll have to customize
    private void ServiceButtonActionlistener(RemoveTaskEvent evt) {
        serviceItemList.remove(evt.button);
        summaryPanel_pnl.remove(evt.button);
        JOptionPane.showConfirmDialog(this, "got to the listener");
    }
    /** Handle the hiding / showing of the paymentGroup panel */
    private void financedState(Boolean value) {
        paymentPlanGroup.setVisible(value);
    }

    /** Save the sale */
    private void saveSale(Sale sale) {
        // Set Sale Attributes
        sale.setTotalPrice(calculateSaleTotal());
        sale.setTax(calculateTax(calculateRawTotal()));
        sale.setFinanced(financed_cb.isSelected() ? "1" : "0");
        sale.setDownPayment(Double.valueOf(downPayment_txt.getText()));
        sale.setPaymentPlan(financed_cb.isSelected() ? paymentPlan_cmb.getSelectedItem().toString() : "Cash");
        sale.setDiscount(calculateDiscount());
        sale.setDate(new java.util.Date()); // default to today's date.
        sale.setSalespersonBonus(calculateSalespersonBonus());
        sale.setSalespersonId(Model.getInstance().getEmployee().getId());

        // Save the Sale (which will include all saleLines and TradeInLines)
        try {
            sale.save(); // will save with insert statement
        } catch (Exception e) {
            e.printStackTrace();
        }

        // Display Successful Save
        statusDisp_lbl.setText("Save Successful");
    }


    /* Recalculate the sales total and displays it in the saleTotal textField */
    private double calculateSaleTotal() {
        // Get Raw Total
        double totalPrice = calculateRawTotal();

        // Subtract the Down Payment
        if (!downPayment_txt.getText().equals("")) {
            totalPrice -= Double.valueOf(downPayment_txt.getText());
        }

        // Calculate Tax
        totalPrice = totalPrice + calculateTax(totalPrice);

        // Update textField display
        saleTotalDisp_lbl.setText(String.valueOf(totalPrice));

        return totalPrice;
    }

    /** Calculate the total of all Sale Items (saleLines - tradeInLines) before downPayment and taxes */
    private double calculateRawTotal() {
        double totalPrice = 0; // starting price to 0

        // Loop through each SaleItem and add up the price appropriately (trade in lines have a negative price)
        for (SaleItem si : Model.getInstance().getSale().getSaleItems()) {
            totalPrice += si.getPrice();
        }

        return totalPrice;
    }

    /**
     * Calculate Tax
     * @return tax amount
     */
    private double calculateTax(double totalPrice) {
        double salesTaxPercent = .0625;
        return totalPrice * salesTaxPercent;
    }

    /** Run through every saleLine and calculate the difference between the list price and actual price */
    private double calculateDiscount() {
        double discount = 0;
        for (SaleLine sl : Model.getInstance().getSale().getSalesLines()) {
            double diff = sl.getListPrice() - sl.getActualPrice();
            discount += diff;
        }
        return discount;
    }

    /** Run through every saleLine and calculate the difference between the list price and actual price */
    private double calculateSalespersonBonus() {
        double bonus = 0;
        Salesperson sp = (Salesperson) Model.getInstance().getEmployee();

        for (SaleLine sl : Model.getInstance().getSale().getSalesLines()) {
            bonus += sl.getActualPrice() * sp.getCommissionPercent();
        }
        return bonus;
    }

    /* Perform search based on the textField criteria.  Then populate the customer search list. */
    private void searchCustomers() {
        try {
            populateCustomerList(CustomerDAO.getInstance().getByAnyName(customerSearch_txt.getText()));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /** Save the current customer (adds or updates via DAO) */
    private void saveCustomer(Customer customer) {
        // Update the customer information.
        try {
            customer.setFirstName(fname_txt.getText());
            customer.setLastName(lname_txt.getText());
            customer.setAddress(address_txt.getText());
            customer.setPhone(phone_txt.getText());
            customer.setHighPrice(Double.valueOf(highPrice_txt.getText()));
            customer.setLowPrice(Double.valueOf(lowPrice_txt.getText()));

            CustomerDAO.getInstance().save(customer);

            // Update the customer_list list model to reflect if we changed the customer's name
            populateCustomerList(null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /** Handles the Editing State of the customer information gui */
    private void customerEditingState(Boolean value) {
        // Begin Edit of the customer
        if (value) {
            // Hide / Show Buttons
            saveCustomer_btn.setVisible(true);
            cancelCustomer_btn.setVisible(true);
            editCustomer_btn.setVisible(false);
        } else { // Stop allowing the editing of a customer
            // Hide / Show Buttons
            saveCustomer_btn.setVisible(false);
            cancelCustomer_btn.setVisible(false);
            editCustomer_btn.setVisible(true);
        }

        // Enable / Disable Text Fields
        fname_txt.setEditable(value);
        lname_txt.setEditable(value);
        address_txt.setEditable(value);
        phone_txt.setEditable(value);
        highPrice_txt.setEditable(value);
        lowPrice_txt.setEditable(value);
    }

    /** Displays the customer information in the appropriate text fields */
    private void updateCustomerInfoDisplay(Customer customer) {
        // Customer Screen
        fname_txt.setText(customer.getFirstName());
        lname_txt.setText(customer.getLastName());
        address_txt.setText(customer.getAddress());
        phone_txt.setText(customer.getPhone());
        highPrice_txt.setText(String.valueOf(customer.getHighPrice()));
        lowPrice_txt.setText(String.valueOf(customer.getLowPrice()));

        // Sale Screen
        saleCustNameDisp_lbl.setText(customer.getFullName());
        saleCustPhoneDisp_lbl.setText(customer.getPhone());
    }

    private void saleEditingState(Boolean value) {
        // Hide/Show new Sale group
        newSaleInfoGroup.setVisible(value);

        if (value) {
            // Reset text field values
            saleTotalDisp_lbl.setText("0");
            downPayment_txt.setText("0");
            statusDisp_lbl.setText(""); // replace save status

            // Hide PaymentPlanGroup
            financedState(false);

            // Create a new empty sale and assign it to the model
            try {
                Model.getInstance().setSale(SaleDAO.getInstance().create(GUID.generate()));
            } catch (Exception e) {
                e.printStackTrace();
            }

            // Instantiate saleLinesTableDataModel
            saleLinesTableDataModel = new SaleLineTableDataModel(Model.getInstance().getSale());

            // Set the JTable model to saleLinesTableDataModel
            saleLines_tbl.setModel(saleLinesTableDataModel);

            // Add listener to saleLinesTableDataModel
            saleLinesTableDataModel.addTableModelListener(saleLines_tbl);

            // Instantiate tradeInLinesTableDataModel
            tradeInLinesTableDataModel = new TradeInLineTableDataModel(Model.getInstance().getSale());

            // Set the JTable model to tradeInLinesTableDataModel
            tradeIns_tbl.setModel(tradeInLinesTableDataModel);

            // Add listener to tradeInLinesTableDataModel
            tradeInLinesTableDataModel.addTableModelListener(tradeIns_tbl);

            // Instantiate saleItemsTableDataModel
            saleItemsTableDataModel = new SaleItemsTableDataModel(Model.getInstance().getSale());

            // Set the JTable model to saleLinesTableDataModel
            saleItems_tbl.setModel(saleItemsTableDataModel);

            // Add listener to saleLinesTableDataModel
            saleItemsTableDataModel.addTableModelListener(saleItems_tbl);

            // Update the current Sale total whenever the saleitems table data model has changed.
            saleItemsTableDataModel.addTableModelListener(new TableModelListener() {

                public void tableChanged(TableModelEvent e) {
                    calculateSaleTotal();
                }
            });

            // Assign Column Labels to JTables
            setColumnLabels();

        } else {
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Magis().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addCar_btn;
    private javax.swing.JButton addCustomer_btn;
    private javax.swing.JPanel addTaskGroup;
    private javax.swing.JButton addTask_btn;
    private javax.swing.JButton addTradeIn_btn1;
    private javax.swing.JButton addTradeIn_btn2;
    private javax.swing.JButton addViewWarranty_btn;
    private javax.swing.JLabel address_lbl;
    private javax.swing.JFormattedTextField address_txt;
    private javax.swing.JButton cancelCustomer_btn;
    private javax.swing.JButton cancelService_btn;
    private javax.swing.JButton cancel_btn;
    private javax.swing.JPanel carDetailsGroup;
    private javax.swing.JPanel carDisplay_pnl1;
    private javax.swing.JList carFeatures_list;
    private javax.swing.JScrollPane carFeatures_sp;
    private javax.swing.JLabel carPriceDisplay_lbl;
    private javax.swing.JLabel carPrice_lbl;
    private javax.swing.JPanel carsAndTradeIns;
    private javax.swing.JLabel colorDisp;
    private javax.swing.JLabel colorDisplay_lbl;
    private javax.swing.JPanel colorGroup;
    private javax.swing.JLabel color_lbl;
    private javax.swing.JTextField color_txt;
    private javax.swing.JPanel custAndSalesperson;
    private javax.swing.JPanel custAndTech_pnl;
    private javax.swing.JLabel custCarMakeDisplay_lbl1;
    private javax.swing.JLabel custCarMakeDisplay_lbl2;
    private javax.swing.JLabel custCarMake_lbl1;
    private javax.swing.JLabel custCarMake_lbl2;
    private javax.swing.JLabel custCarModelDisplay_lbl1;
    private javax.swing.JLabel custCarModelDisplay_lbl2;
    private javax.swing.JLabel custCarModel_lbl1;
    private javax.swing.JLabel custCarModel_lbl2;
    private javax.swing.JLabel custCarVinDisplay_lbl1;
    private javax.swing.JLabel custCarVinDisplay_lbl2;
    private javax.swing.JLabel custCarVin_lbl1;
    private javax.swing.JLabel custCarVin_lbl2;
    private javax.swing.JLabel custCarYearDisplay_lbl1;
    private javax.swing.JLabel custCarYearDisplay_lbl2;
    private javax.swing.JLabel custCarYear_lbl1;
    private javax.swing.JLabel custCarYear_lbl2;
    private javax.swing.JPanel custInfo_pnl;
    private javax.swing.JPanel custSearchGroup;
    private javax.swing.JComboBox custVehicleSelect_cbo1;
    private javax.swing.JPanel customerGroup;
    private javax.swing.JPanel customerGroupService;
    private javax.swing.JPanel customerList_pnl;
    private javax.swing.JScrollPane customerList_sp;
    private javax.swing.JTextField customerSearch_txt;
    private javax.swing.JPanel customerTab_pnl;
    private javax.swing.JList customer_list;
    private javax.swing.JButton deleteTask_btn;
    private javax.swing.JPanel detailsGroup;
    private javax.swing.JPanel downPaymentGroup_pnl;
    private javax.swing.JLabel downPayment_lbl;
    private javax.swing.JLabel downPayment_lbl1;
    private javax.swing.JTextField downPayment_txt;
    private javax.swing.JButton editCustomer_btn;
    private javax.swing.JButton editTask_btn;
    private javax.swing.JPanel featuresGroup;
    private javax.swing.JList features_list;
    private javax.swing.JCheckBox financed_cb;
    private javax.swing.JPanel financingGroup;
    private javax.swing.JLabel fname_lbl;
    private javax.swing.JFormattedTextField fname_txt;
    private javax.swing.JLabel grandTotalDisplay_lbl;
    private javax.swing.JLabel grandTotal_lbl;
    private javax.swing.JPanel grand_total_pnl1;
    private javax.swing.JPanel header_pnl;
    private javax.swing.JLabel highPrice_lbl;
    private javax.swing.JFormattedTextField highPrice_txt;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel laborTotalDisplay_lbl;
    private javax.swing.JLabel laborTotal_lbl;
    private javax.swing.JLabel lname_lbl;
    private javax.swing.JFormattedTextField lname_txt;
    private javax.swing.JLabel lotDisplay_lbl;
    private javax.swing.JLabel lot_lbl;
    private javax.swing.JLabel lowPrice_lbl;
    private javax.swing.JFormattedTextField lowPrice_txt;
    private javax.swing.JLabel magis_lbl;
    private javax.swing.JPanel makeGroup;
    private javax.swing.JButton makeSale_btn;
    private javax.swing.JComboBox make_cmb;
    private javax.swing.JLabel make_lbl;
    private javax.swing.JPanel modelGroup;
    private javax.swing.JComboBox model_cmb;
    private javax.swing.JLabel model_lbl;
    private javax.swing.JPanel newSaleGroup;
    private javax.swing.JPanel newSaleInfoGroup;
    private javax.swing.JButton newSale_btn;
    private javax.swing.JButton newSale_btn1;
    private javax.swing.JPanel newServiceGroup;
    private javax.swing.JPanel newServiceInfoGroup;
    private javax.swing.JLabel partsTaxTotalDisplay_lbl;
    private javax.swing.JLabel partsTaxTotal_lbl;
    private javax.swing.JLabel partsTotalDisplay_lbl;
    private javax.swing.JLabel partsTotal_lbl;
    private javax.swing.JPanel paymentPlanGroup;
    private javax.swing.JComboBox paymentPlan_cmb;
    private javax.swing.JLabel phone_lbl;
    private javax.swing.JFormattedTextField phone_txt;
    private javax.swing.JLabel positionDisp_lbl;
    private javax.swing.JLabel position_lbl;
    private javax.swing.JTextField priceEnd_txt;
    private javax.swing.JPanel priceGroup;
    private javax.swing.JTextField priceStart_txt;
    private javax.swing.JLabel price_lbl;
    private javax.swing.JButton removeCar_btn;
    private javax.swing.JButton removeTradeIn_btn;
    private javax.swing.JScrollPane results_sp;
    private javax.swing.JTable results_table;
    private javax.swing.JPanel saleCarsGroup;
    private javax.swing.JScrollPane saleCars_sp;
    private javax.swing.JLabel saleCustNameDisp_lbl;
    private javax.swing.JLabel saleCustPhoneDisp_lbl;
    private javax.swing.JTable saleItems_tbl;
    private javax.swing.JPanel saleLinesMenu;
    private javax.swing.JTable saleLines_tbl;
    private javax.swing.JPanel saleMenu;
    private javax.swing.JButton saleSelectCustomer_btn;
    private javax.swing.JPanel saleTab_pnl;
    private javax.swing.JTextField saleTotalDisp_lbl;
    private javax.swing.JPanel saleTotalGroup_pnl;
    private javax.swing.JLabel saleTotal_lbl;
    private javax.swing.JScrollPane saleTotals_scrollPane;
    private javax.swing.JPanel salesTotal;
    private javax.swing.JPanel salespersonGroup;
    private javax.swing.JButton saveCustomer_btn;
    private javax.swing.JButton saveSale_btn;
    private javax.swing.JButton saveService_btn;
    private javax.swing.JPanel searchByVin_pnl;
    private javax.swing.JPanel searchDetail_pnl;
    private javax.swing.JButton searchDetails_btn;
    private javax.swing.JPanel searchGroup;
    private javax.swing.JPanel searchGroup_pnl;
    private javax.swing.JPanel searchResultsGroup;
    private javax.swing.JButton searchVin_btn;
    private javax.swing.JLabel serviceCustNameDisp_lbl;
    private javax.swing.JLabel serviceCustPhoneDisp_lbl;
    private javax.swing.JScrollPane serviceDetails_sp;
    private javax.swing.JTextArea serviceDetails_ta;
    private javax.swing.JPanel serviceMenu;
    private javax.swing.JButton serviceSelectCustomer_btn;
    private javax.swing.JPanel serviceSelections;
    private javax.swing.JPanel serviceTab_pnl;
    private javax.swing.JComboBox serviceTaskSelect_cbo1;
    private javax.swing.JPanel serviceTaskSelection;
    private javax.swing.JLabel spId_lbl;
    private javax.swing.JLabel spName_lbl;
    private javax.swing.JLabel statusDisp_lbl;
    private javax.swing.JPanel summaryPanel_pnl1;
    private javax.swing.JTabbedPane tabNavigation;
    private javax.swing.JPanel taskMenu_pnl;
    private javax.swing.JList tasksList_jl;
    private javax.swing.JScrollPane tasksScrollPanel;
    private javax.swing.JLabel to_lbl;
    private javax.swing.JLabel to_lbl1;
    private javax.swing.JPanel totalsGroup_pnl;
    private javax.swing.JPanel tradeInsGroup;
    private javax.swing.JScrollPane tradeIns_sp;
    private javax.swing.JTable tradeIns_tbl;
    private javax.swing.JLabel userDisp_lbl;
    private javax.swing.JPanel userGroup_pnl;
    private javax.swing.JPanel vehicleAndTask1;
    private javax.swing.JPanel vehicleInformation;
    private javax.swing.JPanel vehicleSearchTab_pnl;
    private javax.swing.JPanel vehicleSelection;
    private javax.swing.JLabel vin_lbl;
    private javax.swing.JTextField vin_txt;
    private javax.swing.JLabel welcome_lbl;
    private javax.swing.JTextField yearEnd_txt;
    private javax.swing.JPanel yearGroup;
    private javax.swing.JTextField yearStart_txt;
    private javax.swing.JLabel years_lbl;
    // End of variables declaration//GEN-END:variables
}
